package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.entity.Resources;

import java.util.List;


public interface ResourceMapper extends BaseMapper<Resources> {
    @Select("SELECT * FROM resources WHERE username=#{username}")
    List<Resources> selectResource(String username);
    @Update("UPDATE resources SET states=#{s} , opinion=#{reviewComment} WHERE id=#{id}")
    void updateByIdReview(@Param("id") Integer id, @Param("s")String s, @Param("reviewComment")String reviewComment);
}
